package com.yumingjiang.expand.beancreate;

import org.springframework.beans.factory.FactoryBean;
import org.springframework.stereotype.Component;

/**
 * @description: FactoryBean接口验证：用Afactory类创建A对象
 * @author: John
 * @version: AFactory.java, v1.0 2025年01月05日 04:47
 */
@Component("aFactory")
public class AFactory implements FactoryBean<A> {
    @Override
    public A getObject() throws Exception {
        return new A();
    }

    @Override
    public Class<?> getObjectType() {
        return A.class;
    }
}